package com.jd.dict.util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * Created by liuhaiming on 2017/7/29.
 */
public class DateUtils {
    private static DateFormat formatTime = new SimpleDateFormat("YYYY-MM-DD HH:mm:ss");
    private static DateFormat formatYear = new SimpleDateFormat("YYYY");

    public static String getCurrDate() {
        return formatTime.format( Calendar.getInstance().getTime() );
    }

    public static String getYear() {
        return formatYear.format(Calendar.getInstance().getTime());
    }
}
